package com.ljl.ningwei.service;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.ljl.ningwei.dto.MaterialListByJoinDTO;
import com.ljl.ningwei.entity.Material;
import com.ljl.ningwei.common.page.PageInfoByApp;
import com.ljl.ningwei.common.page.PageInfoByPC;

/**
 * 物料系统类
 * 2025-03-13 20:30
 */
public interface MaterialService {

    Material getById(Long id);

    Material extractById(Long id);

    Long edit(Long id, String name, Long categoryId, String productName, Integer materialCount, String imageUrls);

    void delete(Long id);

    PageInfoByPC getMaterialListByPc(Integer pageNum, Integer pageSize, String keyword);

    PageInfoByApp getMaterialListByApp(Integer pageNum, Integer pageSize, String keyword) throws JsonProcessingException;

    PageInfoByPC<MaterialListByJoinDTO> getMaterialListByJoinDTO(Integer page, Integer pageSize, String keyword);

    PageInfoByApp<Material> getMaterialListByAppAndCid(Integer pageNum, Integer pageSize, Integer cid);

//    void deleteByCategoryId(Long id);
}
